package chapter2_3;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
public class CDPlayerImpl implements CDPlayer{
	
	private CompactDist cd;
	
	public CDPlayerImpl(CompactDist cd) {
		this.cd = cd;
	}
	
	public String play() {
		System.out.println("Playing CD sing: " + cd.sing());
		return cd.sing();
	}

	public CompactDist getCd() {
		return cd;
	}
	public void setCd(CompactDist cd) {
		this.cd = cd;
	}
	
	
}
